use rlp::*;

fn main() {
    let input = get_bytes("f8d48201b485239f82ba008301c2639465b49f7aee40347f5a90b714be4ef086f3fe5e2c884109caeb7bde4000b864c0f4ed310000000000000000000000000000000000000000000000003f24d8e4a0070000000000000000000000000000b932a70a57673d89f4acffbe830e8ed7f75fb9e000000000000000000000000000000000000000000000000000000000000047f625a0c634001385ac4ba20389eb2f3efb414bfdbf2cd23d3f1912ad0a11c4d848b321a04606a1aafa0619f4e8befd0582524bc52fc03d16e48423ce649da1b8e6ce4052").expect("red error");
    println!("input is :{:?}", input);
    let result: String = rlp::decode(&input).expect("is error");
    println!("result is :{:?}", result);
}

fn get_bytes(b: &str) -> Option<Vec<u8>> {
    b.as_bytes()
        .chunks(2)
        .map(|ch| {
            String::from_utf8(ch.into())
                .ok()
                .and_then(|res| u8::from_str_radix(&res, 16).ok())
        }).collect()
}